<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
    
<head profile="http://gmpg.org/xfn/11">
<title>Vacantes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery-slidedeck.pack.lite.js"></script>
<link rel="stylesheet" href="css/font-awesome.css" type ="text/css" />
</head>

<!-- Aqu� solo se usa para el fondo de pantalla y El t�tulo de la p�gina -->    
<body id="top">
<div class="wrapper row1">
  <div id="header" class="clear">
    <div class="fl_left">
      <h1><a href="index.html"></a></h1>
      <p></p>
    </div>
      
      <?php
       include("conectabd.php");
       session_start();

        conectaBase();
        conectaInscripciones();

        $materias="select nombre, hora_inicio, hora_fin, lunes, martes, miercoles, jueves,
			viernes, sabado, cupo,grupo from materia join grupo using(clave_materia) 
			join horario using(horario_id) 
			where clave_materia={$_SESSION['materia']}";

        $amaterias=mysql_query($materias);

        if(mysql_num_rows($amaterias)!=0){
	echo "<table summary=\"Summary Here\" cellpadding=\"0\" cellspacing=\"0\">";
        echo "<thead>";
        echo    "<br></br><br></br><br></br>";
        echo "<tr>";
        echo    "<th>&nbsp Asignatura &nbsp</th>";
        echo    "<th>&nbspGrupo&nbsp</th>";
        echo    "<th>&nbspHora Inicio&nbsp</th>";
        echo    "<th>&nbspHora Fin&nbsp</th>";
        echo    "<th>&nbspL&nbsp</th>";
        echo    "<th>&nbspM&nbsp</th>";
        echo    "<th>&nbspM&nbsp</th>";
        echo    "<th>&nbspJ&nbsp</th>";
        echo    "<th>&nbspV&nbsp</th>";
        echo    "<th>&nbspS&nbsp</th>";
        echo    "<th>&nbspCupo&nbsp&nbsp</th>";
        echo  "</tr>";
        echo    "</thead>";
         echo "<tbody>";
         $i=0;
	while ($reg=mysql_fetch_array($amaterias)) 
	{
                if($i%2==0)
                    echo "<tr class=\"light\">";
                else
                   echo "<tr class=\"dark\">"; 
                    
		echo "<td>".$reg['nombre']."</td>";
		echo "<td>".$reg['grupo']."</td>";
		echo "<td>".$reg['hora_inicio']."</td>";
		echo "<td>".$reg['hora_fin']."</td>";
		echo "<td>"; if($reg['lunes']==1) echo '*'; echo "</td>";
		echo "<td>"; if($reg['martes']==1) echo '*'; echo "</td>";
		echo "<td>"; if($reg['miercoles']==1) echo '*'; echo "</td>";
		echo "<td>"; if($reg['jueves']==1) echo '*'; echo "</td>";
		echo "<td>"; if($reg['viernes']==1) echo '*'; echo "</td>";
		echo "<td>"; if($reg['sabado']==1) echo '*'; echo "</td>";
		echo "<td>".$reg['cupo']."</td>";
		echo "</tr>";
                $i=$i+1;
	}
	echo " </tbody> </table> ";
        }
        else echo "Materia no existe";

    ?>
      
      
  </div>
</div>
<script type="text/javascript">$('.slidedeck').slidedeck();</script>
</body>
</html>

